// 常量索引
const envVal = {
	imgUrl: 'https://wximg.meijiabang.com/hkds/miniapp/images/',
	env: process.env.NODE_ENV,
	// 微信审核版本号，审核时需与后端api config接口的 hkds_wxapp_version 字段统一，审核完成后由后端修改
	// 当前版本号 36
	version:22,
	// oemSource  OEM来源：1中装建材大师 2美搭屋 3万嘉优购 4中装获客大师 ============================================
	// oemSource  OEM来源：1中装建材大师 2美搭屋 3万嘉优购 4中装获客大师 ============================================
	// oemSource  OEM来源：1中装建材大师 2美搭屋 3万嘉优购 4中装获客大师 ============================================
	// oemSource  OEM来源：1中装建材大师 2美搭屋 3万嘉优购 4中装获客大师 ============================================
	oemSource: 3,
	oemObj: {}
}

/** *
 * 获取oem配置信息
 * obj oem配置对象
 * @appid '小程序appid,暂时只做记录使用'
 * @loginBgUrl '登录页图片链接'
 * @taskBgUrl '首页任务弹窗图片链接'
 * @publicQrCode '消息推送公众号二维码'
 * @vipBgUrlCompany 'vip开通公司权益'
 * @vipBgUrlPerson 'vip开通个人权益'
 * @goodsPrompt '商品管理添加提示'
 * @phoneNumber '联系我们的号码'
 * @appKey '百度统计appkey'
 */
function getOemConfig() {
	let obj = {}
	if (envVal.oemSource == 1) {
		envVal.formal = process.env.NODE_ENV == 'development' ? 'https://www.meijiabang.com' : 'https://www.meijiabang.com'

		obj.appid = 'wx3a163add860e0a86'
		obj.promptText = '建材'
		obj.loginBgUrl = envVal.imgUrl + 'login/newbg_material.png'
		obj.taskBgUrl = envVal.imgUrl + 'design/guide-bg.png'
		obj.publicQrCode = envVal.imgUrl + 'publicicon/icon_company.jpg'
		obj.vipBgUrlCompany = envVal.imgUrl + 'vip/company-vip-desc.png'
		obj.vipBgUrlPerson = envVal.imgUrl + 'vip/person-vip-desc.png'
		obj.goodsPrompt = 'https://mall.meijiabang.com/seller'
		obj.phoneNumber = '18606001152'
		obj.appKey = ''
	} else if (envVal.oemSource == 2) {
		envVal.formal = process.env.NODE_ENV == 'development' ? 'https://mdw.meijiabang.com' : 'https://mdw.meijiabang.com'

		obj.appid = 'wxa12fb20cc8b0d1bd'
		obj.promptText = '装修'
		obj.loginBgUrl = envVal.imgUrl + 'login/mdwbg.png'
		obj.taskBgUrl = envVal.imgUrl + 'design/guide-bg-mdw.png'
		obj.publicQrCode = envVal.imgUrl + 'publicicon/icon_company_mdw.jpg'
		obj.vipBgUrlCompany = envVal.imgUrl + 'vip/company-vip-desc.png'
		obj.vipBgUrlPerson = envVal.imgUrl + 'vip/person-vip-desc.png'
		obj.goodsPrompt = envVal.formal + '/seller'
		obj.phoneNumber = '18606001152'
		obj.appKey = '24058dc711'
	} else if (envVal.oemSource == 3) {
		envVal.formal = process.env.NODE_ENV == 'development' ? 'https://wanjiazaixian.com' : 'https://wanjiazaixian.com'

		obj.appid = 'wxff26bbb20552a162'
		obj.promptText = '家具'
		obj.loginBgUrl = envVal.imgUrl + 'login/newbg.png'
		obj.taskBgUrl = envVal.imgUrl + 'design/guide-bg.png'
		obj.publicQrCode = envVal.formal + '/storage/images/common/ectouch_qrcode.jpg'
		obj.vipBgUrlCompany = envVal.imgUrl + 'vip/company-vip-desc-wj.png'
		obj.vipBgUrlPerson = envVal.imgUrl + 'vip/person-vip-desc-wj.png'
		obj.goodsPrompt = envVal.formal + '/seller'
		obj.phoneNumber = '0755-25169525'
		obj.appKey = '756fa5fa5b'
	} else if (envVal.oemSource == 4) {
		envVal.formal = process.env.NODE_ENV == 'development' ? 'https://www.meijiabang.com' : 'https://www.meijiabang.com'

		obj.appid = 'wx231d0e488b073822'
		obj.promptText = '装修'
		obj.loginBgUrl = envVal.imgUrl + 'login/newbg.png'
		obj.taskBgUrl = envVal.imgUrl + 'design/guide-bg.png'
		obj.publicQrCode = envVal.imgUrl + 'publicicon/icon_company.jpg'
		obj.vipBgUrlCompany = envVal.imgUrl + 'vip/company-vip-desc.png'
		obj.vipBgUrlPerson = envVal.imgUrl + 'vip/person-vip-desc.png'
		obj.goodsPrompt = 'https://mall.meijiabang.com/seller'
		obj.phoneNumber = '18606001152'
		obj.appKey = 'b4f0f288c2'
	}

	envVal.oemObj = obj
}

getOemConfig()

export default envVal
